package com.kiln.juxingqs.receiver

import android.content.BroadcastReceiver
import android.content.Context
import android.content.Intent
import com.kiln.juxingqs.ui.JyDetail2Activity
import com.kiln.juxingqs.ui.ZrDetailActivity

class ZrGDListBroadcast : BroadcastReceiver() {

    companion object {
        const val REFREASH_GUADAN_LIST = "zmlywp.zr.refresh"
    }

    override fun onReceive(context: Context?, intent: Intent?) {
        intent?.action.let {
            when (it) {
                REFREASH_GUADAN_LIST -> {
                    if (context is ZrDetailActivity ) {
                        context.refreshGuaDanList()
                    } else if(context is JyDetail2Activity){
                        context.refreshGuaDanList()
                    }
                }
            }
        }
    }
}